
class Character(object):
    __slots__ = (
#        "name",
#        "context",
#        "armature",
#        "arm_data",
#        "bones",
#        "root_bones",
        )

    def __init__(self):#, armature, adj_mat):
        #self.armature = armature
        #self.name = armature.name
        #self.arm_data = armature.data
        #self.bones = {}
        #self.root_bones = []

        #for bone in self.arm_data.bones:
        #    if (not bone.name.startswith("IK_")):
        #        from ossl._types.Bone import Bone
        #        self.bones[bone.name] = Bone(self, bone.name, adj_mat)

        #for bone in self.bones.values():
        #    bone.adjust_hierarchy_up(self)

        #for bone in self.bones.values():
        #    if bone.parent == None:
        #        self.root_bones.append(bone)

        #for bone in self.root_bones:
        #    bone.adjust_hierarchy_down(self)
        pass

############## MenuFolder ###############

import bpy, ossl.menu as menu

class OSSL_MT_Character(menu.MenuFolder):
    bl_label = "OSSL Menu Character"
    bl_idname = "OSSL_MT_Character"

def OSSL_menu_Character(self, comtext):
    self.layout.menu("OSSL_MT_Character", text="Character", icon="OUTLINER_OB_ARMATURE")

import ossl.util as util

def register():
    print("registering: OSSL Type Character")
    bpy.utils.register_class(OSSL_MT_Character)
    bpy.types.TOPBAR_MT_OSSL.append(OSSL_menu_Character)
    util.imports("ossl._types.Character", "load")
    print("registered: OSSL Type Character")

def unregister():
    print("unregistering: OSSL Type Character")
    util.release("ossl._types.Character", "load")
    bpy.types.TOPBAR_MT_OSSL.remove(OSSL_menu_Character)
    bpy.utils.unregister_class(OSSL_MT_Character)
    print("unregistered: OSSL Type Character")

if __name__ == "__main__":
    util.reset_addon()
